﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="details.aspx.cs" Inherits="GreenBuildings.details" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataSourceID="SqlDataSource1" GridLines="Vertical">
            <AlternatingRowStyle BackColor="#DCDCDC" />
            <Columns>
                <asp:BoundField DataField="BuildingName" HeaderText="BuildingName" SortExpression="BuildingName" />
                <asp:BoundField DataField="LongDescription" HeaderText="LongDescription" SortExpression="LongDescription" />
                <asp:ImageField DataImageUrlField="Photo" HeaderText="Photo">
                </asp:ImageField>
            </Columns>
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
            <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#0000A9" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#000065" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BuildingsConnectionString %>" ProviderName="<%$ ConnectionStrings:BuildingsConnectionString.ProviderName %>" SelectCommand="SELECT [Photo], [LongDescription], [BuildingName] FROM [Buildings] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
<p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"  Width="216px" >
            <Columns>
                <asp:BoundField DataField="Author" HeaderText="Author" SortExpression="Author" />
                <asp:BoundField DataField="Comment" HeaderText="Comment" SortExpression="Comment" />
                <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:BuildingsConnectionString %>" ProviderName="<%$ ConnectionStrings:BuildingsConnectionString.ProviderName %>" SelectCommand="SELECT [Author], [Comment], [Title] FROM [Comments] WHERE ([Buildings_fk] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="Buildings_fk" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
<p>
        Add comment:</p>
<p>
        Name:
        <asp:TextBox ID="tb_Author" runat="server"></asp:TextBox>
    </p>
<p>
        Comment Title:
        <asp:TextBox ID="tb_ComTitle" runat="server"></asp:TextBox>
    </p>
<p>
        Comment:</p>
<p>
        &nbsp;
        <asp:TextBox ID="tb_Comment" runat="server" Height="155px" TextMode="MultiLine" Width="347px"></asp:TextBox>
    </p>
<p>
        &nbsp;
        <asp:Button ID="btn_AddComment" runat="server" OnClick="btn_AddComment_Click" Text="Add Comment" />
    </p>
    <p>
        <asp:CheckBoxList ID="CheckBoxList1" runat="server" DataSourceID="TagsDataSource" DataTextField="Tag" DataValueField="ID" RepeatDirection="Horizontal">
        </asp:CheckBoxList>
    </p>
    <p>

        Add New Tags <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Tag Building" />
    </p>
    <p>
        <asp:SqlDataSource ID="TagsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:BuildingsConnectionString %>" ProviderName="<%$ ConnectionStrings:BuildingsConnectionString.ProviderName %>" SelectCommand="SELECT [ID], [Tag] FROM [Tags]"></asp:SqlDataSource>
    </p>
    
</asp:Content>
